/*
 * @Author: your name
 * @Date: 2021-04-07 13:54:56
 * @LastEditTime: 2021-04-07 13:57:48
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \my-app-koa\client\src\store.js
 */

import { createStore, applyMiddleware, compose } from 'redux'
import thunk from 'redux-thunk'
import rootReducer from './reducers'

const middleware = [thunk]
const initialState = {}

const store = createStore(
    rootReducer,
    initialState,
    compose(
        applyMiddleware(...middleware),
        window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__()
    )
)
// const store = createStore(
//     rootReducer,
//     initialState,
//     applyMiddleware(...middleware)
// )

export default store


